174692498b17dc2f43b466094f29fefc51ae7e1d,blade-engine-spine-plugin/src/main/java/com/bladecoder/engine/spine/SpineRenderer.java,SpineRenderer,draw,#SpriteBatch#number#number#number#number#Color#,269

Before Change


			currentSource.skeleton.setY(y / scale);
			currentSource.skeleton.getRootBone().setRotation(rotation);

			batch.setTransformMatrix(batch.getTransformMatrix().scale(scale, scale, 1.0f));
			
			if(tint != null)
				currentSource.skeleton.setColor(tint);
			
			renderer.draw(batch, currentSource.skeleton);
			
			if(tint != null)
				batch.setColor(Color.WHITE);
			batch.setTransformMatrix(batch.getTransformMatrix().scale(1 / scale, 1 / scale, 1.0f));
		} else {
			x = x - getWidth() / 2 * scale;
			RectangleRenderer.draw(batch, x, y, getWidth() * scale, getHeight() * scale, Color.RED);

After Change


	private static final Matrix4 tmp = new Matrix4();

	@Override
	public void draw(SpriteBatch batch, float x, float y, float scale, float rotation, Color tint) {

		if (currentSource != null && currentSource.skeleton != null) {
			Matrix4 tm = batch.getTransformMatrix();
			tmp.set(tm);
			
			currentSource.skeleton.setX(x / scale);
			currentSource.skeleton.setY(y / scale);
			
			tm.rotate(0, 0, 1, rotation).scale(scale, scale, 1);
			batch.setTransformMatrix(tm);
			
			if(tint != null)
				currentSource.skeleton.setColor(tint);
			
			renderer.draw(batch, currentSource.skeleton);
			
			if(tint != null)
				batch.setColor(Color.WHITE);
			batch.setTransformMatrix(tmp);
		} else {
			x = x - getWidth() / 2 * scale;
			RectangleRenderer.draw(batch, x, y, getWidth() * scale, getHeight() * scale, Color.RED);